const promise = new Promise((resolve,reject) => {
    // reject('error')  
    resolve("sucess2")
})
promise
// 链式
.then(res => {
    console.log("then1",res)
    let newP = new Promise((resolve,reject) => {
        setTimeout(() => {
            reject('newP error')
        },1000)
    });
    return newP
    // promise.resolve()
    // return promise return this
})
// .then(console.log('1233'))
.then(res => {
    console.log("then2",res)
})
// catch 当promise rejected 后 执行 catch
.catch(err => {
    console.log("catch:",err)
    // catch then promise.resolve 去包一下
    // return 2
})
.then(res => {
    console.log("then3:",res)
})